package com.jason.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @program: Cloud2021
 * @description: 返回前端的封装实体类
 * @author: Jason_Wang
 * @create: 2021-12-05 11:00
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T>
{
    private Integer code;
    private String message;
    private T      data;


    /**
     *
     * @param code
     * @param message
     * 两参构造方法
     */
    public CommonResult(Integer code, String message) {
        this(code,message,null);
    }
}
